<!DOCTYPE html>
<html lang="zh-CN" <?php if(isset($jump_dir)) echo 'dir="'.$jump_dir.'"'; ?>>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title><?php echo isset($jump_title) ? htmlspecialchars($jump_title) : '提示信息'; ?></title>
    <style>
        html, body { height: 100%; }
        body {
            margin:0; padding:0;
            background: linear-gradient(135deg, #f8fafc 0%, #e9f0fb 100%);
            font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
            height: 100vh;
        }
        .jump-center {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .card {
            max-width: 600px;
            width: 100%;
            background: #fff;
            border-radius: 1.2rem;
            box-shadow: 0 8px 32px rgba(52, 152, 219, 0.10), 0 1.5px 6px rgba(0,0,0,0.04);
            padding: 0 0 32px 0;
            border: none;
        }
        .card-header {
            border-top-left-radius: 1.2rem;
            border-top-right-radius: 1.2rem;
            padding: 2.2rem 2.5rem 1.2rem 2.5rem;
            background: #fff;
            border-bottom: 1px solid #e3e6ea;
            text-align: center;
            font-size: 1.45rem;
            font-weight: 700;
            letter-spacing: 1px;
            color: #222;
        }
        .alert {
            margin: 0 auto 22px auto;
            padding: 1.3rem 2.5rem;
            border-radius: .5rem;
            font-size: 1.18rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }
        .alert-success { background: #e6f9ef; color: #1e824c; border: 1px solid #b7e4c7; }
        .alert-danger { background: #fff0f0; color: #c82333; border: 1px solid #f5c6cb; }
        .jump-icon {
            margin-right: 18px;
            display: inline-block;
            vertical-align: middle;
        }
        .jump-icon svg { width: 48px; height: 48px; }
        .jump-wait {
            color: #888;
            font-size: 1.08rem;
            margin-bottom: 12px;
            margin-top: 8px;
        }
        .jump-link, .btn {
            color: #fff;
            background: linear-gradient(90deg, #3A92FF 0%, #007bff 100%);
            border: none;
            border-radius: 2rem;
            padding: 0.7rem 2.2rem;
            font-size: 1.08rem;
            text-decoration: none;
            margin-top: 10px;
            display: inline-block;
            transition: background 0.2s, box-shadow 0.2s;
            box-shadow: 0 2px 8px rgba(52, 152, 219, 0.08);
            font-weight: 500;
            letter-spacing: 1px;
        }
        .jump-link:hover, .btn:hover { background: linear-gradient(90deg, #007bff 0%, #3A92FF 100%); box-shadow: 0 4px 16px rgba(52, 152, 219, 0.13); }
        .jump-lock {
            color: #c82333;
            font-size: 1.25rem;
            margin-top: 32px;
            font-weight: 600;
            text-align: center;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 48px;
        }
        @media (max-width: 700px) {
            .card { max-width: 98vw; padding: 0; }
            .card-header, .alert { padding-left: 5vw; padding-right: 5vw; }
            .jump-icon svg { width: 36px; height: 36px; }
        }
    </style>
</head>
<body>
    <div class="jump-center">
        <div class="card">
            <div class="card-header">
                <?php echo isset($jump_title) ? htmlspecialchars($jump_title) : '提示信息'; ?>
            </div>
            <div class="alert <?php echo $code ? 'alert-success' : 'alert-danger'; ?>">
                <span class="jump-icon">
                <?php if ($code): ?>
                    <!-- SVG对勾动画 -->
                    <svg viewBox="0 0 60 60">
                        <circle cx="30" cy="30" r="28" fill="#fff" stroke="#2ecc71" stroke-width="4"/>
                        <polyline points="18,32 28,42 44,22" fill="none" stroke="#2ecc71" stroke-width="4" stroke-linecap="round" stroke-linejoin="round">
                            <animate attributeName="points" from="18,32 28,42 28,42" to="18,32 28,42 44,22" dur="0.5s" fill="freeze" />
                        </polyline>
                    </svg>
                <?php else: ?>
                    <!-- SVG叉号动画 -->
                    <svg viewBox="0 0 60 60">
                        <circle cx="30" cy="30" r="28" fill="#fff" stroke="#e74c3c" stroke-width="4"/>
                        <line x1="20" y1="20" x2="40" y2="40" stroke="#e74c3c" stroke-width="4" stroke-linecap="round">
                            <animate attributeName="x2" from="20" to="40" dur="0.3s" fill="freeze" />
                            <animate attributeName="y2" from="20" to="40" dur="0.3s" fill="freeze" />
                        </line>
                        <line x1="40" y1="20" x2="20" y2="40" stroke="#e74c3c" stroke-width="4" stroke-linecap="round">
                            <animate attributeName="x2" from="40" to="20" dur="0.3s" fill="freeze" />
                            <animate attributeName="y2" from="20" to="40" dur="0.3s" fill="freeze" />
                        </line>
                    </svg>
                <?php endif; ?>
                </span>
                <span><?php echo htmlspecialchars($msg ?? ''); ?></span>
            </div>
            <?php if (empty($lock)): ?>
            <div class="jump-wait">
                <?php echo isset($wait_text) ? htmlspecialchars($wait_text) : ('页面将在 '.((int)$wait).' 秒后自动跳转...'); ?><br>
                <a id="href" class="jump-link btn" href="<?php echo $url; ?>"><?php echo isset($btn_text) ? htmlspecialchars($btn_text) : '立即跳转'; ?></a>
            </div>
            <?php else: ?>
            <div class="jump-lock"><?php echo isset($lock_text) ? htmlspecialchars($lock_text) : '本页已锁定'; ?></div>
            <?php endif; ?>
        </div>
    </div>
    <script>
        (function(){
            var lock = <?php echo !empty($lock) ? 'true' : 'false'; ?>;
            if(lock) return;
            var wait = document.getElementById('wait');
            if(wait){
                var href = document.getElementById('href').href;
                var time = parseInt(<?php echo (int)$wait; ?>);
                wait.innerText = time;
                var interval = setInterval(function(){
                    time--;
                    wait.innerText = time;
                    if(time <= 0) {
                        location.href = href;
                        clearInterval(interval);
                    }
                }, 1000);
            }
        })();
    </script>
</body>
</html> 